package com.example.lgseckill.controller;

import com.example.lgseckill.domain.SeckillProduct;
import com.example.lgseckill.domain.SeckillProductPreheatVO;
import com.example.lgseckill.service.ISeckillProducttService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author:e
 * Date:2021/8/17 10:30 上午
 **/
@RestController
@RequestMapping("/seckill/product")
public class SeckillProductController {

    @Autowired
    private ISeckillProducttService seckillProducttService;

    /**
     * 获取秒杀商品列表信息
     * @return
     */
    @GetMapping()
    public List<SeckillProductPreheatVO> seckillList(){
        return seckillProducttService.getSeckillList();
    }


}
